package cn.szzsi.platform.service;

import cn.szzsi.model.AgentBalanceDetail;
import com.jfinal.kit.StrKit;

import java.math.BigDecimal;
import java.util.Date;

public class AgentBalanceDetailService {
    public static final AgentBalanceDetailService service=new AgentBalanceDetailService();

    /**
     *
     * @param agentId
     * @param addMoney
     * @param type
     * @param fromAgentId
     * @param fromBusinessId
     * @param orderSn
     * @param level
     * @param remark
     */
    public void saveInfo(String agentId, BigDecimal addMoney,Integer type,String fromAgentId,String fromBusinessId,String orderSn,Integer level,String remark){
        AgentBalanceDetail abd=new AgentBalanceDetail();
        abd.setId(StrKit.getRandomUUID());
        abd.setAgentId(agentId);
        abd.setAddMoney(addMoney);
        abd.setType(type);
        abd.setFromAgentId(fromAgentId);
        abd.setFromBusinessId(fromBusinessId);
        abd.setOrderSn(orderSn);
        abd.setLevel(level);
        abd.setRemark(remark);
        abd.setCreateDate(new Date());
        abd.save();
    }
}
